Skip to content

Conversation

@Seol-JY
Copy link
Contributor

@Seol-JY Seol-JY commented Dec 14, 2025

🧷 문제 링크

https://www.acmicpc.net/problem/5569

🧭 풀이 시간

30분

👀 체감 난이도

✏️ 문제 설명

(1,1)에서 (w,h)까지 동쪽 또는 북쪽으로만 이동
단, 방향을 바꾼 직후에는 다시 방향을 바꿀 수 없음

🔍 풀이 방법

4차원 DP, dp[i][j][dir][turned]

  • 직진: 이전 상태 관계없이 가능 → turned=0
  • 방향 전환: turned=0인 상태에서만 가능 → turned=1
    방향 전환 제약 조건을 상태로 관리

⏳ 회고

어렵군

@Seol-JY Seol-JY added the success 👍 해설을 보지 않고 풀었을 때 label Dec 14, 2025
@ShinHeeEul ShinHeeEul merged commit 790a7e9 into main Dec 14, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

success 👍 해설을 보지 않고 풀었을 때

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants